package face.jx.sdk.test;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import face.jx.sdk.util.IFaceResultCallBack;
import face.jx.sdk.util.JXFace;

public class MainActivity extends AppCompatActivity {
    private int hasRecoCount;//已经检测的次数

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.bu_test_sdk).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                JXFace.startFaceRecognition(MainActivity.this, 3, hasRecoCount, new IFaceResultCallBack() {
                    @Override
                    public void onFaceRecognitionReult(int resutCode, String resultStr, int hasRecognitionCount) {
                        hasRecoCount = hasRecognitionCount;
                        Toast.makeText(MainActivity.this,resultStr,Toast.LENGTH_SHORT).show();
                    }
                });
            }
        });
    }
}
